<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1">
    <title id="bc20941">ALTER USER</title>
    <body>
        <p id="sql_command_desc">Changes the definition of a database role (user).</p>
        <section id="section2">
            <title>Synopsis</title>
            <codeblock id="sql_command_synopsis">ALTER USER <varname>name</varname> RENAME TO <varname>newname</varname>

ALTER USER <varname>name</varname> SET <varname>config_parameter</varname> {TO | =} {<varname>value</varname> | DEFAULT}

ALTER USER <varname>name</varname> RESET <varname>config_parameter</varname>

ALTER USER <varname>name</varname> RESOURCE QUEUE {<varname>queue_name</varname> | NONE}

ALTER USER <varname>name</varname> RESOURCE GROUP {<varname>group_name</varname> | NONE}

ALTER USER <varname>name</varname> [ [WITH] <varname>option</varname> [ ... ] ]</codeblock>
            <p>where <varname>option</varname> can be:</p>
            <codeblock>      SUPERUSER | NOSUPERUSER
    | CREATEDB | NOCREATEDB
    | CREATEROLE | NOCREATEROLE
    | CREATEUSER | NOCREATEUSER
    | CREATEEXTTABLE | NOCREATEEXTTABLE 
      [ ( <varname>attribute</varname>='<varname>value</varname>'[, ...] ) ]
           where <varname>attributes</varname> and <varname>value</varname> are:
           type='readable'|'writable'
           protocol='gpfdist'|'http'
    | INHERIT | NOINHERIT
    | LOGIN | NOLOGIN
    | REPLICATION | NOREPLICATION
    | CONNECTION LIMIT <varname>connlimit</varname>
    | [ENCRYPTED | UNENCRYPTED] PASSWORD '<varname>password</varname>'
    | VALID UNTIL '<varname>timestamp</varname>'
    | [ DENY <varname>deny_point</varname> ]
    | [ DENY BETWEEN <varname>deny_point</varname> AND <varname>deny_point</varname>]
    | [ DROP DENY FOR <varname>deny_point</varname> ]</codeblock>
        </section>
        <section id="section3">
            <title>Description</title>
            <p><codeph>ALTER USER</codeph> is an alias for <codeph>ALTER ROLE</codeph>. See
                        <codeph><xref href="ALTER_ROLE.xml#topic1" type="topic" format="dita"
                    /></codeph> for more information.</p>
        </section>
        <section id="section4">
            <title>Compatibility</title>
            <p>The <codeph>ALTER USER</codeph> statement is a Greenplum Database extension. The SQL
                standard leaves the definition of users to the implementation.</p>
        </section>
        <section id="section5">
            <title>See Also</title>
            <p><codeph><xref href="ALTER_ROLE.xml#topic1" type="topic" format="dita"/></codeph>,
                        <codeph><xref href="CREATE_USER.xml#topic1" type="topic" format="dita"
                    /></codeph>, <codeph><xref href="DROP_USER.xml#topic1" type="topic"
                        format="dita"/></codeph></p>
        </section>
    </body>
</topic>
